package hehe.validation.annotation;

import hehe.validation.base.Rule;
import hehe.validation.validator.LengthValidator;

import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
 * 字符长度注解
 *<B>说明：</B>
 *<pre>
 * 略
 *</pre>
 *<B>示例：</B>
 *<pre>
 *  略
 *</pre>
 *<B>日志：</B>
 *<pre>
 *  略
 *</pre>
 *<B>注意事项：</B>
 *<pre>
 *  略
 *</pre>
 */
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Constraint(processor = ValidatorProcessor.class,validator = {LengthValidator.class})
public @interface Length
{
    String tip()  default "";
    String[] scene() default {};
    boolean non()  default false;
    boolean onEmpty()  default false;
    boolean goOn() default false;
    String operator() default Rule.AND_OPERATOR;
    int number() default 0;
    String character() default "";

}
